package File;

import java.io.File;
import java.io.IOException;

public class testFile
{
    public static void main (String[] args) throws IOException
    {
        File file = new File("G:/WeGameApps");
        
        printFile(file, 0);
    }
    
    static void printFile(File file, int level)
    {
        for(int i = 0; i <= level; i++)
            System.out.print("-");
    
        System.out.println(file.getName());
        
        if(file.isDirectory())
        {
            File[] files = file.listFiles();
            
            for(File temps: files)
                printFile(temps, level + 1);
        }
    }
}
